<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
ul li {list-style-type: none}
table
{
    border-collapse:collapse;
}
table,th, td
{
    border: 1px solid black;
}
</style>
</head>
<body>
   <h1>This is The Goods Page</h1>
   <div>
        <form action="/goods/doSaveGoods" method="post">
            <ul>
               <li><input type="hidden" name="id" th:value="${goods!=null?goods.id:''}"></li>
               <li>name</li>
               <li><input type="text" name="name" th:value="${goods!=null?goods.name:''}"></li>
               <li>remark</li>
               <li><textarea rows="5" cols="50" name="remark" th:text="${goods!=null?goods.remark:''}"></textarea></li>
               <li><input type="submit" value="Save"></li>
            </ul>
        </form>
        
        <hr />
        <table width="60%">
           <thead>
               <tr>
                  <th>id</th>
                  <th>name</th>
                  <th>remark</th>
                  <th>createdTime</th>
                  <th colspan="2">Operation</th>
               </tr>
           </thead>
           <tbody>
               <tr th:each="g: ${list}">
                  <td th:text="${g.id}"></td>
                  <td th:text="${g.name}"></td>
                  <td th:text="${g.remark}"></td>
                  <td th:text="${#dates.format(g.createdTime, 'yyyy/MM/dd HH:mm')}"></td>
                  <td><a th:href="@{/goods/doDeleteById(id=${g.id})}">delete</a></td>
                  <td><a th:href="@{/goods/doFindById(id=${g.id})}">update</a></td>
               </tr>
           </tbody>
        </table>
   </div>
</body>
</html>